package com.lishuang.test.org;

import com.lishuang.org.domain.Employee;
import com.lishuang.org.service.IEmployeeService;
import com.lishuang.test.basic.SpringTest;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;


public class SpringTestEmployee extends SpringTest {

    @Autowired
    private IEmployeeService employeeService;

    @Test
    public void test1() throws Exception {
        employeeService.loadAll().forEach(System.out::println);
    }

    @Test
    public void test2() throws Exception {
        Employee employee = new Employee();
        employee.setUsername("哈哈");
        employeeService.save(employee);
        System.out.println(employee);
    }
}
